---
layout: single
property_name: justify-content
---

<section id="justify-content" class="property">
  <header class="property-header">
    <nav class="property-links">
        <a class="property-collection" href="{{site.url}}/flexbox/">
          In collection: <strong>flexbox</strong>
        </a>
      <a class="property-links-direct" href="{{site.url}}/property/justify-content/" data-property-name="justify-content" data-tooltip="Single page for this property">Permalink</a>
      <a class="property-share" data-tooltip="Share on Twitter or Facebook" data-property-name="justify-content">Share</a>
        <a target="_blank" href="http://caniuse.com/#feat=flexbox" data-tooltip="See on Can I use..." rel="external">Can I use</a>
      <a target="_blank" href="https://developer.mozilla.org/en/docs/Web/CSS/justify-content" data-tooltip="See on Mozilla Developer Network" rel="external">MDN</a>
    </nav>
    <h2 class="property-name">
      <a href="#justify-content"><span>#</span>justify-content</a>
    </h2>
    <div class="property-description">
      <p>Defines how flexbox/grid items are aligned according to the <strong>main</strong> axis, within a flexbox/grid container.</p>

    </div>

  </header>

    <style type="text/css">.justify-content { background: hsl(48, 100%, 67%);background: #310736;display: flex;padding: 0; }</style>




    <section class="example">
      <header class="example-header">
        <p class="example-name">
            <code class="example-default" data-tooltip="This is the property's default value">default</code>


          <code class="example-value" data-tooltip="Click to copy" data-clipboard-text="justify-content: flex-start;">justify-content: flex-start;</code>
        </p>
        <div class="example-description">
          <p>The flexbox/grid items are pushed towards the <strong>start</strong> of the container&#39;s main axis.</p>

        </div>
      </header>

      <aside class="example-preview">
        <div class="example-browser"><i></i><i></i><i></i></div>
        <div class="example-output">
          <div class="example-output-div justify-content " id="justify-content-flex-start"><p class="block block--alpha"><strong>1.</strong> One</p><p class="block block--beta"><strong>2.</strong> Two</p><p class="block block--pink"><strong>3.</strong> Three</p></div>
        </div>
      </aside>
          <style type="text/css">#justify-content-flex-start{ justify-content:flex-start;}</style>
    </section>
    <section class="example">
      <header class="example-header">
        <p class="example-name">


          <code class="example-value" data-tooltip="Click to copy" data-clipboard-text="justify-content: flex-end;">justify-content: flex-end;</code>
        </p>
        <div class="example-description">
          <p>The flexbox/grid items are pushed towards the <strong>end</strong> of the container&#39;s main axis.</p>

        </div>
      </header>

      <aside class="example-preview">
        <div class="example-browser"><i></i><i></i><i></i></div>
        <div class="example-output">
          <div class="example-output-div justify-content " id="justify-content-flex-end"><p class="block block--alpha"><strong>1.</strong> One</p><p class="block block--beta"><strong>2.</strong> Two</p><p class="block block--pink"><strong>3.</strong> Three</p></div>
        </div>
      </aside>
          <style type="text/css">#justify-content-flex-end{ justify-content:flex-end;}</style>
    </section>
    <section class="example">
      <header class="example-header">
        <p class="example-name">


          <code class="example-value" data-tooltip="Click to copy" data-clipboard-text="justify-content: center;">justify-content: center;</code>
        </p>
        <div class="example-description">
          <p>The flexbox/grid items are <strong>centered</strong> along the container&#39;s main axis.</p>

        </div>
      </header>

      <aside class="example-preview">
        <div class="example-browser"><i></i><i></i><i></i></div>
        <div class="example-output">
          <div class="example-output-div justify-content " id="justify-content-center"><p class="block block--alpha"><strong>1.</strong> One</p><p class="block block--beta"><strong>2.</strong> Two</p><p class="block block--pink"><strong>3.</strong> Three</p></div>
        </div>
      </aside>
          <style type="text/css">#justify-content-center{ justify-content:center;}</style>
    </section>
    <section class="example">
      <header class="example-header">
        <p class="example-name">


          <code class="example-value" data-tooltip="Click to copy" data-clipboard-text="justify-content: space-between;">justify-content: space-between;</code>
        </p>
        <div class="example-description">
          <p>The remaining space is distributed <strong>between</strong> the flexbox/grid items.</p>

        </div>
      </header>

      <aside class="example-preview">
        <div class="example-browser"><i></i><i></i><i></i></div>
        <div class="example-output">
          <div class="example-output-div justify-content " id="justify-content-space-between"><p class="block block--alpha"><strong>1.</strong> One</p><p class="block block--beta"><strong>2.</strong> Two</p><p class="block block--pink"><strong>3.</strong> Three</p></div>
        </div>
      </aside>
          <style type="text/css">#justify-content-space-between{ justify-content:space-between;}</style>
    </section>
    <section class="example">
      <header class="example-header">
        <p class="example-name">


          <code class="example-value" data-tooltip="Click to copy" data-clipboard-text="justify-content: space-around;">justify-content: space-around;</code>
        </p>
        <div class="example-description">
          <p>The remaining space is distributed <strong>around</strong> the flexbox/grid items: this adds space <em>before</em> the first item and <em>after</em> the last one.</p>

        </div>
      </header>

      <aside class="example-preview">
        <div class="example-browser"><i></i><i></i><i></i></div>
        <div class="example-output">
          <div class="example-output-div justify-content " id="justify-content-space-around"><p class="block block--alpha"><strong>1.</strong> One</p><p class="block block--beta"><strong>2.</strong> Two</p><p class="block block--pink"><strong>3.</strong> Three</p></div>
        </div>
      </aside>
          <style type="text/css">#justify-content-space-around{ justify-content:space-around;}</style>
    </section>

</section>
